package com.squirrel.serialportcore.entity.model;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.Queue;

import java.util.Map;

/**
 * 绑定配置对象
 *
 * @author Squbi
 * @date 2021/3/16 17:46
 */
public class BindingModel {
    /**
     * queue 队列
     * exchange 交换机
     * routing 路由键
     * args 参数
     *
     * @author Squbi
     * @date 2021/3/16 17:49
     */
    private Queue queue;
    private Exchange exchange;
    private String routing;
    private Map<String, Object> args = null;

    public BindingModel(Queue queue, Exchange exchange, String routing) {
        this.queue = queue;
        this.exchange = exchange;
        this.routing = routing;
    }

    public BindingModel(Queue queue, Exchange exchange, String routing, Map<String, Object> args) {
        this.queue = queue;
        this.exchange = exchange;
        this.routing = routing;
        this.args = args;
    }

    public Queue getQueue() {
        return queue;
    }

    public BindingModel setQueue(Queue queue) {
        this.queue = queue;
        return this;
    }

    public Exchange getExchange() {
        return exchange;
    }

    public BindingModel setExchange(Exchange exchange) {
        this.exchange = exchange;
        return this;
    }

    public String getRouting() {
        return routing;
    }

    public BindingModel setRouting(String routing) {
        this.routing = routing;
        return this;
    }

    public Map<String, Object> getArgs() {
        return args;
    }

    public BindingModel setArgs(Map<String, Object> args) {
        this.args = args;
        return this;
    }
}
